import { createRouter, createWebHashHistory } from 'vue-router'

import IndexView from "@/views/IndexView.vue";
import LoginView from "@/views/LoginView.vue";
import ProductView from "@/views/ProductView.vue";
import OrderView from "@/views/OrderView.vue";


const routes = [
  {
    path: '/',
    name: 'login',
    component: LoginView
  },
  {
    path: '/index',
    name: 'index',
    component: IndexView,
    children:[
      {
        path: '/product',
        name: 'product',
        component: ProductView
      },
      {
        path: '/order',
        name: 'Order',
        component: OrderView,
      }

    ]

  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
